Skip to content

Pin build-info-extractor-gradle to 5.2.5 to fix Gradle 6.8.1 build#94

Closed
vigy321 wants to merge 1 commit intolinkedin:masterfrom
vigy321:fix-jfrog-plugin-pin
Closed

Pin build-info-extractor-gradle to 5.2.5 to fix Gradle 6.8.1 build#94
vigy321 wants to merge 1 commit intolinkedin:masterfrom
vigy321:fix-jfrog-plugin-pin

Conversation

@vigy321
Copy link
Copy Markdown

@vigy321 vigy321 commented Apr 29, 2026

Problem

./gradlew build fails on master at the project-configuration phase:

* What went wrong:
A problem occurred configuring root project 'data-integration-library'.
> Failed to create Jar file ~/.gradle/caches/jars-8/<hash>/jackson-core-2.15.4.jar.

Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
    at org.objectweb.asm.ClassReader.<init>(ClassReader.java:196)
    at org.gradle.internal.classpath.InstrumentingClasspathFileTransformer

This affects every PR, not a single branch — master itself reproduces it. CI was last green on 2025-06-06; the next CI run (on PR #93) failed with this error.

Root cause

build.gradle pins three plugins to dynamic versions:

classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:latest.release'
classpath "org.shipkit:shipkit-auto-version:latest.release"
classpath "org.shipkit:shipkit-changelog:latest.release"

Between June 2025 and now, JFrog published build-info-extractor-gradle 6.0.0+, which latest.release now resolves to (current: 6.0.4). 6.0.0+ bumped its jackson-databind dependency from 2.14.12.15.4, transitively pulling in jackson-core:2.15.4 — a multi-release JAR containing Java 17 (major version 61) class files.

Gradle 6.8.1's classpath instrumenter walks every class in every buildscript jar (to cache an instrumented copy under ~/.gradle/caches/jars-8/) using a bundled ASM that predates Java 17 bytecode support. It cannot read the MR-JAR Java 17 entries and aborts before the project ever compiles.

This was confirmed locally with JDK 8 + Gradle 6.8.1 (matching CI). Cache invalidation, daemon restart, and --refresh-dependencies all reproduce identically — it is a deterministic incompatibility, not a transient cache/network issue.

Fix

Pin build-info-extractor-gradle to 5.2.5 — the last release on jackson-databind:2.14.1, which is Java 8 compatible and configures cleanly under Gradle 6.8.1.

The other two latest.release lines (shipkit-auto-version, shipkit-changelog) do not transitively depend on jackson and are not currently broken; they are left untouched in this minimal fix but remain a latent risk for future drift.

Validation

Local build with the pin applied (JDK 1.8.0_282 + Gradle 6.8.1):

$ ./gradlew build
...
> Task :cdi-core:check
> Task :cdi-core:build
BUILD SUCCESSFUL in 50s
13 actionable tasks: 9 executed, 4 up-to-date

All existing tests pass.

Back-compatibility

  • No behavior change at runtime — this is a build-time plugin version pin only.
  • Plugin 5.2.5 has been generally available since well before the last green CI run, so this rolls back to a known-good state rather than introducing new risk.

The buildscript classpath used `latest.release`, which now resolves to
6.0.4. JFrog 6.0.0+ depends on jackson-databind:2.15.4, transitively
pulling jackson-core:2.15.4 — a multi-release JAR containing Java 17
(major version 61) class files. Gradle 6.8.1's classpath instrumenter
walks every class via a bundled ASM that does not understand Java 17
bytecode and fails with:

  Failed to create Jar file ~/.gradle/caches/jars-8/<hash>/jackson-core-2.15.4.jar
  Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61

5.2.5 is the last release on jackson-databind:2.14.1, which is Java 8
compatible and configures cleanly under Gradle 6.8.1.
@vigy321 vigy321 marked this pull request as ready for review April 29, 2026 10:20
avinas-kumar pushed a commit that referenced this pull request Apr 30, 2026
Cut release 0.2.119 covering:
- #93 (HDFS reader: ms.hdfs.reader.parse.json.strings flag)
- #94 (build-info-extractor-gradle pin to 5.2.5)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vigy321 vigy321 closed this Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant